<?php
require 'lib/Console.class.php';
require 'lib/Job.class.php';

$certsPath = '/path/to/certificate/files/';	// Path to certificates
$cert = $certsPath.'cert.pem';				// Private key + Certificate [ + CA certificate ]
$cacert = $certsPath.'cacert.pem';			// CA certificate (peer authentication)

$console = new Console($cert, $cacert);

$result = $console->connect('localhost', 1234);
if ($result === false) {
	die('Unable to connect'."\n");
}

$console->setVariable('Ciaooo', 'Come va?');

print_r($console->getVariables());

print_r(Job::getJobs($console));

echo 'CASPER_ROOT_DIR: '.$console->getVariable('CASPER_ROOT_DIR')."\n";